<?php

//call library
require_once('../nusoap-0.9.5/lib/nusoap.php');
$URL = "http://localhost/EXOTraWS/ws/ws-server.php";
$namespace = $URL . '?wsdl';
//using soap_server to create server object
$server = new soap_server;
$server->configureWSDL('saludostring', $namespace);

//register a function that works on server
$server->register("getsaludo", array("nombre" => "xsd:string"), array("return" => "xsd:string"), "urn:saludo", "urn:saludo#getsaludo");

// create the function
function getsaludo($name) {
   $myname = "Hola <b>" . $name . "</b>";
   return $myname;
}

// create HTTP listener
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
exit();
